# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-django-guardian
_pyname=django-guardian
pkgver=2.4.0
pkgrel=1
arch="noarch"
pkgdesc="Implementation of per object permissions on top of Django’s authorization backend"
url="https://pypi.python.org/project/django-guardian"
license="MIT"
depends="
	py3-django
	py3-django-environ
	"
makedepends="
	py3-setuptools
	py3-wheel
	py3-gpep517
	"
checkdepends="
	py3-pytest
	py3-pytest-django
	"
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/d/django-guardian/django-guardian-$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver
subpackages="$pkgname-pyc"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest -v
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
7e65a27fbb485a047dd02466b7e36daceb4a27b5ff30ec035fa37b7d300e78e43de213606e54d0b1be2e64ae8835a55cef98788ae45ec2446e502fdd312d8ed6  py3-django-guardian-2.4.0.tar.gz
"
